package concurrency;

import java.util.concurrent.TimeUnit;

/**
 * Created by sunzhengjie on 2017/1/19.
 */
public class TestInterrupt {

    public class Block implements Runnable{
        @Override
        public void run() {
            try {
                while (!Thread.interrupted()) {
                    try{
                        TimeUnit.SECONDS.sleep(1);
                    }finally {

                    }
                }
            }catch(InterruptedException ex){

            }
        }
    }
}
